{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/partner/index')}">合作伙伴管理</a></li>
            <li class=""><a href="{:url('admin/partner/add')}">添加合作伙伴</a></li>
            <li class="layui-this">编辑合作伙伴</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/partner/update')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">伙伴名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" value="{$partner.name}" required lay-verify="required" placeholder="请输入合作伙伴名称" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">url</label>
                        <div class="layui-input-block">
                            <input type="text" name="url" value="{$partner.url}" placeholder="url链接(选填)" class="layui-input">
                        </div>
                    </div>
                 
                    <div class="layui-form-item">
                        <label class="layui-form-label">缩略图</label>
                        <div class="layui-input-block">
                            <input type="text" name="thumb" value="{$partner.thumb}" class="layui-input layui-input-inline" id="thumb">
                            <button type="button" class="layui-btn" id="test1"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                        </div>
                    </div>
                     <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-block">
                            <img src="{$partner.thumb}" style="width: 300px">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="radio" name="status" value="1" title="启用" {if condition="$partner.status==1"} checked="checked"{/if}>
                            <input type="radio" name="status" value="0" title="禁用" {if condition="$partner.status==0"} checked="checked"{/if}>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$partner.id}">
                            <button class="layui-btn" lay-submit lay-filter="*">更新</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
                <div class="smallImg {notempty name='$partner.photo'}smallImgCss{/notempty}" style="background-image:url('{notempty name='$partner.photo'}{$partner.photo}{/notempty}');" id="phot"></div>
            </div>
        </div>
    </div>
</div>
{/block}